<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CSafeList&lt; T &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="class_c_safe_list-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CSafeList&lt; T &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>线程安全操作列表类  
 <a href="class_c_safe_list.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_safe_list_8h_source.html">SafeList.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a86a5d69cf85fdd5486207a1b9343426c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#a86a5d69cf85fdd5486207a1b9343426c">Empty</a> ()</td></tr>
<tr class="memdesc:a86a5d69cf85fdd5486207a1b9343426c"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断链表中是否为空  <a href="class_c_safe_list.html#a86a5d69cf85fdd5486207a1b9343426c">更多...</a><br /></td></tr>
<tr class="separator:a86a5d69cf85fdd5486207a1b9343426c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0725949916405d6d8a019a2807178643"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#a0725949916405d6d8a019a2807178643">InsertBack</a> (const T &amp;value)</td></tr>
<tr class="memdesc:a0725949916405d6d8a019a2807178643"><td class="mdescLeft">&#160;</td><td class="mdescRight">向链表尾部中插入一个数据  <a href="class_c_safe_list.html#a0725949916405d6d8a019a2807178643">更多...</a><br /></td></tr>
<tr class="separator:a0725949916405d6d8a019a2807178643"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a186e4e916b7f798293596b06051777c9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#a186e4e916b7f798293596b06051777c9">Front</a> (T &amp;value)</td></tr>
<tr class="memdesc:a186e4e916b7f798293596b06051777c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回链表的头部数据，并删除  <a href="class_c_safe_list.html#a186e4e916b7f798293596b06051777c9">更多...</a><br /></td></tr>
<tr class="separator:a186e4e916b7f798293596b06051777c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba43b98fa25909c447a97585b11e5158"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#aba43b98fa25909c447a97585b11e5158">Back</a> (T &amp;value)</td></tr>
<tr class="memdesc:aba43b98fa25909c447a97585b11e5158"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回链表的尾部数据，并删除  <a href="class_c_safe_list.html#aba43b98fa25909c447a97585b11e5158">更多...</a><br /></td></tr>
<tr class="separator:aba43b98fa25909c447a97585b11e5158"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a2faf03b7713a512830e7ccacda915a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="tools_8h.html#a36cb3b01d81ffd844bbbfb54003e06ec">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#a9a2faf03b7713a512830e7ccacda915a">Size</a> ()</td></tr>
<tr class="memdesc:a9a2faf03b7713a512830e7ccacda915a"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回链表的大小  <a href="class_c_safe_list.html#a9a2faf03b7713a512830e7ccacda915a">更多...</a><br /></td></tr>
<tr class="separator:a9a2faf03b7713a512830e7ccacda915a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:ab44b3462a15bdb623ab314db9a85e615"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_mutex.html">CMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#ab44b3462a15bdb623ab314db9a85e615">_mutexList</a></td></tr>
<tr class="separator:ab44b3462a15bdb623ab314db9a85e615"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f753e9aaf32e560d4ded5532a5e08b9"><td class="memItemLeft" align="right" valign="top">std::list&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#a1f753e9aaf32e560d4ded5532a5e08b9">_list</a></td></tr>
<tr class="separator:a1f753e9aaf32e560d4ded5532a5e08b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3cdc187c5103ac0ef70f31e53340617"><td class="memItemLeft" align="right" valign="top"><a class="el" href="tools_8h.html#a36cb3b01d81ffd844bbbfb54003e06ec">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_safe_list.html#ac3cdc187c5103ac0ef70f31e53340617">_size</a></td></tr>
<tr class="separator:ac3cdc187c5103ac0ef70f31e53340617"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br />
class CSafeList&lt; T &gt;</h3>

<p>线程安全操作列表类 </p>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00012">12</a> 行定义.</p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="aba43b98fa25909c447a97585b11e5158"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba43b98fa25909c447a97585b11e5158">&#9670;&nbsp;</a></span>Back()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::Back </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回链表的尾部数据，并删除 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>接收链表返回的数据值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>如果有数据则返回true,否则返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00058">58</a> 行定义.</p>

</div>
</div>
<a id="a86a5d69cf85fdd5486207a1b9343426c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86a5d69cf85fdd5486207a1b9343426c">&#9670;&nbsp;</a></span>Empty()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::Empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断链表中是否为空 </p>
<dl class="section return"><dt>返回</dt><dd>为空返回true,否则返回false </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>使用时应当小心，多线程的情况下不能保证其值的正确性 </dd></dl>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00020">20</a> 行定义.</p>

</div>
</div>
<a id="a186e4e916b7f798293596b06051777c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a186e4e916b7f798293596b06051777c9">&#9670;&nbsp;</a></span>Front()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::Front </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回链表的头部数据，并删除 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>接收链表返回的数据值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>如果有数据则返回true,否则返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00042">42</a> 行定义.</p>

</div>
</div>
<a id="a0725949916405d6d8a019a2807178643"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0725949916405d6d8a019a2807178643">&#9670;&nbsp;</a></span>InsertBack()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::InsertBack </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>向链表尾部中插入一个数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>需要插入的值 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00030">30</a> 行定义.</p>

</div>
</div>
<a id="a9a2faf03b7713a512830e7ccacda915a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a2faf03b7713a512830e7ccacda915a">&#9670;&nbsp;</a></span>Size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a36cb3b01d81ffd844bbbfb54003e06ec">UINT</a> <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::Size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回链表的大小 </p>
<dl class="section remark"><dt>备注</dt><dd>使用时应当小心，多线程的情况下不能保证其值的实时性 </dd></dl>

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00073">73</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a1f753e9aaf32e560d4ded5532a5e08b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f753e9aaf32e560d4ded5532a5e08b9">&#9670;&nbsp;</a></span>_list</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::list&lt;T&gt; <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::_list</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00079">79</a> 行定义.</p>

</div>
</div>
<a id="ab44b3462a15bdb623ab314db9a85e615"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab44b3462a15bdb623ab314db9a85e615">&#9670;&nbsp;</a></span>_mutexList</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_mutex.html">CMutex</a> <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::_mutexList</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00078">78</a> 行定义.</p>

</div>
</div>
<a id="ac3cdc187c5103ac0ef70f31e53340617"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3cdc187c5103ac0ef70f31e53340617">&#9670;&nbsp;</a></span>_size</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="tools_8h.html#a36cb3b01d81ffd844bbbfb54003e06ec">UINT</a> <a class="el" href="class_c_safe_list.html">CSafeList</a>&lt; T &gt;::_size</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_safe_list_8h_source.html">SafeList.h</a> 第 <a class="el" href="_safe_list_8h_source.html#l00080">80</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/algorithm/<a class="el" href="_safe_list_8h_source.html">SafeList.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
